#include "cartesian.h"

Cartesian::Cartesian(double a, double b) : Coordinates(a, b)
{

}

Cartesian::Cartesian() : Coordinates(0, 0)
{

}

Polar Cartesian::convertToPolar()
{
    Polar tmp(sqrt(firstCoordinate * firstCoordinate + secondCoordinate * secondCoordinate),
        atan(secondCoordinate / firstCoordinate) * 180 / M_PI);
    return tmp;
}
